package com.ctrip.ec.biz.dao.album;
import com.ctrip.ec.dal.DaoBase;
import com.ctrip.ec.biz.entity.album.AlbumEntity;
import com.ctrip.ec.dal.DbAccess;
import org.springframework.stereotype.Service;

import java.sql.SQLException;
import java.util.List;

@Service
public class AlbumDao extends DaoBase<AlbumEntity> {
    public AlbumDao() {
        super(AlbumEntity.class);
    }
    public AlbumDao(DbAccess db) {
        super(AlbumEntity.class,db);
    }

    public List<AlbumEntity> listByName(String name) throws SQLException {
        String sql = "select * " + this.getTableName() + " where ";
        return this.db.query(AlbumEntity.class,sql);
    }
}
